<script setup>
import { ref } from 'vue'
const list = ref([
    {
        name: 'OP01',
        num: '88%'
    },
    {
        name: 'OP02',
        num: '68%'
    },
    {
        name: 'OP03',
        num: '28%'
    },
    {
        name: 'OP04',
        num: '82%'
    },
    {
        name: 'OP05',
        num: '38%'
    },
    {
        name: 'OP06',
        num: '48%'
    },
    {
        name: 'OP07',
        num: '81%'
    }
])
</script>

<template>
    <div class="com-bottom-card">
        <div class="com-card-head">
            <h1>设备状态</h1>
        </div>
        <div class="com-panel-content panel">
            <div class="left">
                <strong class="number">86%</strong>
                <span class="title">设备OEE</span>
            </div>
            <div class="right">
                <div class="item" v-for="(item, index) in list" :key="index">
                    <span class="name">{{ item.name }}</span>
                    <strong class="number">{{ item.num }}</strong>
                </div>
            </div>
        </div>
    </div>
</template>

<style scoped lang="scss">
.panel {
    .left {
        width: 135px;
        height: 160px;
        margin: 25px 15px;
        background: url(./assets/img/st1.png) no-repeat;
        background-size: 100% 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        .number {
            width: 76px;
            height: 76px;
            background: url(./assets/img/st2.png) no-repeat;
            background-size: 100% 100%;
            font-size: 24px;
            color: #28e2ff;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            margin-bottom: 10px;
        }

        .title {
            color: #ffffff;
            font-size: 16px;
            font-weight: bold;
        }
    }

    .right {
        padding: 15px;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        flex: 1;

        .item {
            width: 85px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: #ffffff;
            padding: 8px;
            .name {
                font-size: 16px;
            }

            .number {
                font-size: 17px;
            }
        }
    }
}
</style>
